home *** CD-ROM | disk | FTP | other *** search
/ Dos/V Magazine 1995 October 15 / CD [VMAG951015].bin / _demo / nekodemo / pcbk / shared.dir / 00301.ls < prev    next >
Encoding:
Text File  |  1995-06-01  |  5.3 KB  |  182 lines

  1. on startMovie
  2.   global menuflag, jumpflag
  3.   set menuflag to 0
  4.   set jumpflag to 1
  5. end
  6.  
  7. on stopMovie
  8.   unLoadCast()
  9.   sound stop 1
  10.   sound stop 2
  11. end
  12.  
  13. on playcdda
  14.   global gcdaudio, gmusictruck
  15.   set gcdaudio to opencdda()
  16.   set len to mgettracklength(gcdaudio, gmusictruck)
  17.   set the timeoutLength to len / 75 * 60
  18.   mplayloop(gcdaudio, [gmusictruck, 0])
  19. end
  20.  
  21. on enterFrame
  22.   global menuflag, jumpflag, gprevmovie, gnextmovie
  23.   if rollOver(35) and (gprevmovie <> EMPTY) then
  24.     cursor([201, 203])
  25.   else
  26.     if rollOver(36) and (gnextmovie <> EMPTY) then
  27.       cursor([202, 204])
  28.     else
  29.       if rollOver(37) then
  30.         cursor([205, 206])
  31.       else
  32.         if rollOver(38) then
  33.           cursor([207, 208])
  34.         else
  35.           cursor(-1)
  36.           repeat while the mouseDown = 1
  37.             showmenu()
  38.           end repeat
  39.           hidemenu()
  40.           if jumpflag = 0 then
  41.             if rollOver(30) then
  42.               set jumpflag to 1
  43.               puppetSound("ORG")
  44.             else
  45.               if rollOver(31) then
  46.                 puppetSound("ENG")
  47.                 set jumpflag to 1
  48.               else
  49.                 if rollOver(37) then
  50.                   go("A")
  51.                 else
  52.                   if rollOver(38) then
  53.                     go("R")
  54.                   end if
  55.                 end if
  56.               end if
  57.             end if
  58.           end if
  59.         end if
  60.       end if
  61.     end if
  62.   end if
  63. end
  64.  
  65. on showmenu
  66.   global menuflag, jumpflag
  67.   if menuflag = 0 then
  68.     if (the mouseH < 600) and (the mouseH > 100) then
  69.       puppetSprite(30, 1)
  70.       puppetSprite(31, 1)
  71.       puppetSprite(32, 1)
  72.       puppetSprite(33, 1)
  73.       set the locH of sprite 30 to the mouseH - 30
  74.       set the locV of sprite 30 to the mouseV - 30
  75.       set the locH of sprite 31 to the mouseH + 30
  76.       set the locV of sprite 31 to the mouseV - 30
  77.       set the locH of sprite 32 to the mouseH - 30
  78.       set the locV of sprite 32 to the mouseV + 30
  79.       set the locH of sprite 33 to the mouseH + 30
  80.       set the locV of sprite 33 to the mouseV + 30
  81.       set the visible of sprite 30 to 1
  82.       set the visible of sprite 31 to 1
  83.       set the visible of sprite 32 to 1
  84.       set the visible of sprite 33 to 1
  85.       updateStage()
  86.       set menuflag to 1
  87.       set jumpflag to 0
  88.     end if
  89.   else
  90.     selectmenu(30)
  91.     selectmenu(31)
  92.     selectmenu(32)
  93.     selectmenu(33)
  94.     updateStage()
  95.   end if
  96. end
  97.  
  98. on hidemenu
  99.   global menuflag
  100.   if menuflag = 1 then
  101.     set the visible of sprite 30 to 0
  102.     set the visible of sprite 31 to 0
  103.     set the visible of sprite 32 to 0
  104.     set the visible of sprite 33 to 0
  105.     updateStage()
  106.     set menuflag to 0
  107.   end if
  108. end
  109.  
  110. on selectmenu amenu
  111.   if rollOver(amenu) then
  112.     set the ink of sprite amenu to 4
  113.   else
  114.     set the ink of sprite amenu to 36
  115.   end if
  116. end
  117.  
  118. on stopcdaudio
  119.   global gcdaudio
  120.   mpause(gcdaudio)
  121.   mcancelloop(gcdaudio)
  122.   repeat while mreadstatus(gcdaudio) = 1
  123.   end repeat
  124.   mdispose(gcdaudio)
  125. end
  126.  
  127. on initkpanlist
  128.   global thekpanlist
  129.   set thestamplist to EMPTY
  130.   set thekpanlist to "01INTRO_,                ,@::MAIN:01INTRO_,1" & RETURN
  131.   put "03MOMO__,@::RTRV:RTRV0300,@::MAIN:ASTART__,3" & RETURN after thekpanlist
  132.   put "04YONONK,@::RTRV:RTRV0400,@::MAIN:ASTART__,4" & RETURN after thekpanlist
  133.   put "05ONAJI_,@::RTRV:RTRV0500,@::MAIN:01INTRO_,5" & RETURN after thekpanlist
  134.   put "06YOKITM,@::RTRV:RTRV0600,@::MAIN:01INTRO_,6" & RETURN after thekpanlist
  135.   put "07UTATAN,@::RTRV:RTRV0700,@::MAIN:01INTRO_,7" & RETURN after thekpanlist
  136.   put "08MONOOM,@::RTRV:RTRV0800,@::MAIN:01INTRO_,8" & RETURN after thekpanlist
  137.   put "09TURIAG,@::RTRV:RTRV0900,@::MAIN:01INTRO_,9" & RETURN after thekpanlist
  138.   put "10KOGOTO,@::RTRV:RTRV1000,@::MAIN:01INTRO_,10" & RETURN after thekpanlist
  139.   put "11NOZARS,@::RTRV:RTRV1100,@::MAIN:01INTRO_,11" & RETURN after thekpanlist
  140.   put "12KOCHI_,@::RTRV:RTRV1200,@::MAIN:01INTRO_,12" & RETURN after thekpanlist
  141.   put "13URIHAM,@::RTRV:RTRV1300,@::MAIN:01INTRO_,13" & RETURN after thekpanlist
  142.   put "14IROHA_,@::RTRV:RTRV1400,@::MAIN:01INTRO_,14" & RETURN after thekpanlist
  143.   put "15TUKIWO,@::RTRV:RTRV1500,@::MAIN:01INTRO_,15" & RETURN after thekpanlist
  144.   put "16TUINI_,@::RTRV:RTRV1600,@::MAIN:01INTRO_,16" & RETURN after thekpanlist
  145.   put "17OUJYOU,@::RTRV:RTRV1700,@::MAIN:01INTRO_,18" & RETURN after thekpanlist
  146.   put "RTRV0300,                ,@::MAIN:01INTRO_,18" & RETURN after thekpanlist
  147. end
  148.  
  149. on getkpanlistdata
  150.   global thekpanlist, gnextmovie, gprevmovie, grtrvmovie, grtrnmovie, gmusictruck
  151.   set amovie to the movie
  152.   repeat with i = 1 to 19
  153.     set checkLine to line i of thekpanlist
  154.     set amovie2 to item 1 of checkLine
  155.     if amovie = amovie2 then
  156.       set grtrvmovie to item 2 of checkLine
  157.       set grtrnmovie to item 3 of checkLine
  158.       set amusictruck to item 4 of checkLine
  159.       set gmusictruck to value(amusictruck) + 1
  160.       set checkLine to line i - 1 of thekpanlist
  161.       set gprevmovie to item 1 of checkLine
  162.       set checkLine to line i + 1 of thekpanlist
  163.       set gnextmovie to item 1 of checkLine
  164.       exit
  165.     end if
  166.   end repeat
  167. end
  168.  
  169. on waitticks atickcount
  170.   set theendtime to ticks() + atickcount
  171.   repeat while ticks() < theendtime
  172.     nothing()
  173.   end repeat
  174. end
  175.  
  176. on disablebuttons
  177.   set the visible of sprite 30 to 0
  178.   set the visible of sprite 31 to 0
  179.   set the visible of sprite 32 to 0
  180.   set the visible of sprite 33 to 0
  181. end
  182.